var t = getApp();

Page({
    data: {
        achievementList: [],
        type: "",
        page: 1,
        finished: !1
    },
    onLoad: function(t) {
        this.data.type = t.type, this.getData();
    },
    getData: function() {
        var a = this;
        if (!this.data.finished) {
            var e = t.getNetAddresss("plugin.weighted_dividend.api.index.orderList");
            t._getNetWork({
                url: e,
                data: {
                    page: this.data.page,
                    time_type: this.data.type
                },
                success: function(t) {
                    if (1 !== t.data.result) return wx.showToast({
                        title: t.data.msg
                    }), !1;
                    var e, i = t.data.data, s = !1;
                    (0 === i.data.length || i.data.length < i.per_page || i.current_page === i.last_page) && (s = !0), 
                    e = a.data.achievementList.concat(i.data), a.setData({
                        finished: s,
                        achievementList: e,
                        page: ++a.data.page
                    });
                }
            });
        }
    },
    onPullDownRefresh: function() {
        this.setData({
            achievementList: [],
            page: 1,
            finished: !1
        }), this.getData();
    },
    onReachBottom: function() {
        this.getData();
    }
});